#include "StdAfx.h"
#include "XXReaderFlyware.h"

#include <iostream>
#include <string>

using namespace std;

ostream& xxair::operator<<(ostream& os, const DataResult& dr)
{
	os	<<dr.tripInfo<<"\t"<<dr.aeroplaneType<<"\t"<<dr.company
		<<"\t"<<dr.begin<<"\t"<<dr.beginTime<<"\t"<<dr.end<<"\t"<<dr.endTime<<"\t"//<<dr.date<<"\t"
		<<dr.money<<"\t"<<dr.discout<<"\t"<<dr.airOil<<"\t"<<dr.sum
		<<"\t"<<dr.dataFrom<<"\n";
	return os;
}

istream& xxair::operator>>(istream& is,  DataResult& dr)
{
	is >>dr.tripInfo>>dr.aeroplaneType>>dr.company>>dr.begin>>dr.beginTime
		>>dr.end>>dr.endTime//>>dr.date
		>>dr.money>>dr.discout>>dr.airOil>>dr.sum>>dr.dataFrom;
	return is;
}
bool xxair::operator==(DataResult& dr1,DataResult& dr2)
{
	if (dr1.tripInfo == dr2.tripInfo)
	{
		return true;
	}
	return false;
}

bool  xxair::operator==(DataResult& dr, string info)
{
	if (dr.tripInfo == info)
	{
		return true;
	} 
	else
	{
		return false;
	}
}


xxair::XXReaderFlyware::XXReaderFlyware(void)
{
}

xxair::XXReaderFlyware::~XXReaderFlyware(void)
{
}
